package org.example.musica.controller;


import org.example.musica.entity.Admin;
import org.example.musica.mapper.AdminMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class HelloController {

    @Autowired
    private AdminMapper adminMapper;

    @RequestMapping("/hello")
    public String hello() {
        return "Hello,springBoot";
    }

    @RequestMapping("/hi")
    public String hi() {
        return "hi";


    }
    @RequestMapping("/admin/all")
    public List<Admin> selectAll(){
        return adminMapper.selectList(null);

    }

}
